<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Store extends Model
{
    use HasFactory;

    protected $table = 'stores';

    public function getInfoList($field="",$val=""){

        if($field == ""){
            return $this->get();
        }else{
            return $this->where($field,'=',$val)->get();
        }

    }

    public function getInfo($field="",$val=""){
        return $this->where($field,'=',$val)->first();
    }
}
